/*=====================================================================================================================
                    Copyright(c) 2009 Geometric PLM Software Corp. All rights reserved.
                             Unpublished - All rights reserved
=======================================================================================================================
File description:
    Filename: vector_c.h
    Module  : Common module.

        This file includes the operations of the simluative vector.

=======================================================================================================================
Date               Name              Description of Change
14-Jul-2009        Penn,Xie          Initialize creation
$HISTORY$
=====================================================================================================================*/
#ifndef VECTOR_C_H
#define VECTOR_C_H

#define VECTOR_ok               0
#define VECTOR_Out_of_range     2


#ifdef __cplusplus
    extern "C"
    {
#endif

    // Define the node structure.

    /* Base operations */

    /**
    * Allocates new vector, initial capacity=`capacity'.
    * @param capacity  - <I> initial capacity
    * @param increment - <I> incremental growth rate when needed
    * @return - pointer to a dynamically allocated vector. NULL if no 
    *           memory can be allocated. On success, the vector has 
    *           a initial capacity of `capacity' and will grow in steps 
    *           of `increment'.
    * Example:      v = VECTOR_new( 100, 10 );
    */
    extern int Dataset_import( char* datasettype, char* datasetname,char* filepath, tag_t* tagDataset);

    /**
    * Appends one pointer at the end of the vector.
    * @param v       - <I> vector to which the element is added
    * @param element - <I> pointer to the element to be added
    * @return - pointer to a potentially dynamically reallocated vector
    *           NULL if capacity was not sufficient and no memory can be
    *           allocated
    *
    *      convenient form of vector_add_n(), calls vector_add_n()
    * Example:           v = VECTOR_add ( v, "line 1" );
    */
    extern int Dataset_export( char* datasetname,tag_t tagDataset,char* filepath);

#ifdef __cplusplus
    }
#endif


#endif
